package app.netant.book.lawen8;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Lawen8Root extends BaseRoot {
	
	public Lawen8Root(){
		this.homeUrl = "http://www.lawen8.me/modules/article/articlelist.php?class=7&page=2";
		this.pageUrl = "http://www.lawen8.me/modules/article/articlelist.php?class=7&page=";
		this.tableKey = "lawen8";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx;
	}

	@Override
	public BasePage buildPage(String url) {
		return new Lawen8Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Lawen8Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Lawen8Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Lawen8Root root = new Lawen8Root();
		//root.analyse(106);
		root.excepCycle();
	}


	
}
